﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace SevenInvaders.LEVEL_JONATHAN
{
    class JonathanEnemy:Enemy
    {
        animation animation1;

        public static List<JonathanEnemy> list = new List<JonathanEnemy>();

        public enum IAType { goDown, goDownAndUp };

        public IAType currentIA;

        public JonathanEnemy(Texture2D texture, Vector2 position)
            : base(texture)
        {
            this.Position = position;
            
            //this.Velocity = new Vector2(10, 0);
            animation1 = new animation();
            
            //animation1.frame.X = 0;
            //animation1.frame.Y = 370;
            //animation1.frame.Width = 30;
            //animation1.frame.Height = 30;

            //animation1.frames = 3;
            //animation1.fps = 5;

            //current_animation = animation1;
        }

        public override void Update(GameTime gameTime)
        {
            switch (currentIA)
            {
                case IAType.goDown:
                    PositionY += Velocity.Y;

                    

                    break;

                case IAType.goDownAndUp:
                    
                    PositionY += Velocity.Y;
                    
                    if (PositionY > 400)
                    {
                        Velocity = new Vector2(Velocity.X, -Velocity.Y);

                    }
                    break;

                default:
                    PositionX = 10;
                    break;


            }
        }
    }
}
